<?php
function get_all_statut(){
	 $req = pg_query("SELECT DISTINCT s.idstatut as id,s.statutpourecole as statut from statut s order by s.statutpourecole");
	 return $req; 	 
}

function get_all_etablissement(){
	 $req = pg_query("SELECT DISTINCT e.idetablissement as id,e.nometabl as etablissement from etablissement e ");
	 return $req; 	 
}

function get_enseignant_from_statut($statut)
{
	$req = pg_query('SELECT e.idenseignant as id, e.nomens as nomens, e.prenomens as prenomens, s.statutpourecole as statut FROM enseignant e, statut s WHERE e.idstatut=$statut');
	return $req; 
}
?>
